﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MII_FIF.Common
{
    internal class StringUtil
    {
        internal static int? ToInt32(string value)
        {
            int ret = 0;
            if (int.TryParse(value, out ret))
                return ret;            
            return null;
        }

        internal static bool? ToBoolean(string value)
        {            
            bool ret = false;
            if (bool.TryParse(value, out ret))
                return ret;
            return null;
        }

        internal static Guid? ToGuid(string value)
        {
            Guid ret = Guid.Empty;
            if (Guid.TryParse(value, out ret))
                return ret;
            return null;
        }
    }
}
